using System;
using System.Collections.Generic;
using System.Text;

namespace TimelineNet.Library.Themes {
    [Serializable()]
    public class ThemeEventDuration {

        public string color;
        public double opacity;
        public string impreciseColor;
        public double impreciseOpacity;
        private string themeClientID;
        public string ThemeClientID {
            get { return themeClientID; }
            set { themeClientID = value; }
        }
        public override string ToString() {
            System.Text.StringBuilder sb = new System.Text.StringBuilder();
            if(this.color != string.Empty) sb.Append(string.Format("{1}.event.duration.color='{0}';", color, ThemeClientID));
            if(this.opacity != 0) sb.Append(string.Format("{1}.event.duration.opacity={0};", opacity, ThemeClientID));
            if(this.impreciseColor != string.Empty) sb.Append(string.Format("{1}.event.duration.impreciseColor='{0}';", impreciseColor, ThemeClientID));
            if(this.impreciseOpacity != 0) sb.Append(string.Format("{1}.event.duration.impreciseOpacity={0};", impreciseOpacity, ThemeClientID));
            return sb.ToString();
        }

    }
}
